package org.framework.define.mapper.support;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.framework.define.bean.entity.TblUserAccount;
import org.framework.define.mapper.AbstractObjectRowMapper;
import org.framework.server.util.UserUtil;

public class UserAccountRowMapper extends AbstractObjectRowMapper<TblUserAccount> {

	public UserAccountRowMapper() {
		super(TblUserAccount.class);
	}

	@Override
	protected void mapRowHandler(ResultSet rs, TblUserAccount entity) {
		try {
			entity.setLevel(UserUtil.countLevel(rs.getInt("credit")));
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}


}
